import { defHttp } from '/@/utils/http/axios';

enum Api {
  AddRuleCatalog = '/web/safe/check/standard/catalog/add', //添加信息
  UpdateRule = '/web/safe/check/standard/edit', //修改信息
  DelRuleCatalog = '/web/safe/check/standard/catalog/delete/{id}', //删除表格数据
  GetRuleCatalogInfo = '/web/safe/check/standard/catalog/detail/{id}', //删除
  UpdateRuleCatalog = '/web/safe/check/standard/catalog/edit', //编辑树
  wtt = '​/web​/safe​/check​/standard​/copy​/to​/{tenantId}', //超管同步检查规范信息到指定机构
  AddRule = '/web/safe/check/standard/add', //树节点新增
  DelRule = '/web/safe/check/standard/delete/{id}', //树节点删除
  GetRuleInfo = '/web/safe/check/standard/detail/{id}',
  GetRuleList = '/web/safe/check/standard/list', //列表
  IndustryLIstanbul = '/web/system/industry/list', //企业类型列表
  TreeList = '/web/safe/check/standard/catalog/tree/{industryId}', //检查规范列表
}
/**
 * @description: 检查规范列表
 */
export function treeList(params: any) {
  return defHttp.get<any>({
    url: Api.TreeList,
    params,
  });
}
/**
 * @description: 新增检查规范目录
 */
export function industryLIstanbul(params: any) {
  return defHttp.post<any>({
    url: Api.IndustryLIstanbul,
    params,
  });
}
/**
 * @description: 新增检查规范目录
 */
export function addRuleCatalog(params: any) {
  return defHttp.post<any>({
    url: Api.AddRuleCatalog,
    params,
  });
}
/**
 * @description: 删除检查规范目录
 */
export function delRuleCatalog(params: any) {
  return defHttp.post<any>({
    url: Api.DelRuleCatalog,
    params,
  });
}
/**
 * @description: 获取检查规范目录信息
 */
export function getRuleCatalogInfo(params: any) {
  return defHttp.get<any>({
    url: Api.GetRuleCatalogInfo,
    params,
  });
}

/**
 * @description: 更新企业类别
 */
export function updateRuleCatalog(params: any) {
  return defHttp.post<any>({
    url: Api.UpdateRuleCatalog,
    params,
  });
}

/**
 * @description: 获取企业类别列表
 */
export function getRuleCatalogTreeDataByCorpType(params: any) {
  return defHttp.get<any>({
    url: Api.GetRuleCatalogTreeDataByCorpType,
    params,
  });
}

/**
 * @description: 新增企业
 */
export function addRule(params: any) {
  return defHttp.post<any>({
    url: Api.AddRule,
    params,
  });
}
/**
 * @description: 删除企业
 */
export function delRule(params: any) {
  return defHttp.post<any>({
    url: Api.DelRule,
    params,
  });
}
/**
 * @description: 获取企业
 */
export function getRuleInfo(params: any) {
  return defHttp.get<any>({
    url: Api.GetRuleInfo,
    params,
  });
}

/**
 * @description: 更新企业
 */
export function updateRule(params: any) {
  return defHttp.post<any>({
    url: Api.UpdateRule,
    params,
  });
}

/**
 * @description: 获取企业列表
 */
export function getRuleList(params: any) {
  return defHttp.post<any>({
    url: Api.GetRuleList,
    params,
  });
}
